<?php 
require_once('Config.php');
require_once('MsgStack.php');
session_start();
$msg = new MsgStack();


if($_GET['delid']!=""){
  $delSql = "delete from User where id=".$_GET['delid'];
  $delRes = mysql_query($delSql);
  if(!$delRes){
    $msg->push("Delete user failure!");
    $_SESSION['DELETE_USER_FAILURE']=$msg->getMsg(); 
    header("Location:userManage.php?msg=DELETE_USER_FAILURE");   
  }else{
    $msg->push("Delete user successful!");
    $_SESSION['DELETE_USER_SUCCESSFUL']=$msg->getMsg(); 
    header("Location:userManage.php?msg=DELETE_USER_SUCCESSFUL");  
  }
}
?>